Skip to content

Conversation

@dudanogueira
Copy link
Contributor

It now accepts

{"name": "ExampleSchema"} or {"class": "ExampleSchema"}

as well as "dataType": "text[]", or "dataType": ["text[]"]

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

config = config.copy()
properties = []
for prop in config["properties"]:
prop = prop.copy()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can skip the copy

self,
config: dict,
) -> Union[Collection, Awaitable[CollectionAsync]]:
# Support both "name" and "class" fields for backward compatibility
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand it right, this is becasue the TS client provides a different output? Is that correct? If yes, could you update the comment?

assert config.properties[0].data_type == DataType.TEXT

# Clean up
client.collections.delete(collection_name_3)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs a testcanse for the "name" - you could also parametrice our test to make it more readable, check for example test_replication_config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants